#高阶函数
print(abs(-10))


x = -5
y = 6
f = abs
print(f(x)+f(y))

def f_(x):
    return x + 1

print(list(map(f_, [1,2,3,4])))

from functools import reduce
def add_(x, y):
    return x * y

print(reduce(add_, [1,2,3,4,5,6,7]))

def not_empty(s):
    return s and s.strip()

print(list(filter(not_empty, ['A', '', 'B', None, 'C', '  '])))